package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.ViewQueryDaoImpl;
import com.asset.salesforce.domain.ViewQuery;

@Service
@Transactional(readOnly = true)
public class ViewQueryService {
	@Autowired
	private ViewQueryDaoImpl viewQueryDao;
	
	public List<ViewQuery> getViewQueries(Integer viewId ) {
		return viewQueryDao.getViewQueries(viewId);
	}
	@Transactional(readOnly = false)
	public void addViewQuery(ViewQuery viewQuery){
		viewQueryDao.addViewQuery(viewQuery);
	}
	public ViewQuery getViewQueryById(Integer Id ) {
		return viewQueryDao.getViewQueryById(Id);
	}
	@Transactional(readOnly = false)
	public void saveOrupdate(ViewQuery viewQuery){
		viewQueryDao.saveOrupdate(viewQuery);
	}
	public ViewQuery loadViewQuery(Integer id) {
		return viewQueryDao.loadViewQuery(id);
	}
	@Transactional(readOnly = false)
	public void deleteViewSelectedFields(ViewQuery viewQuery) {
		viewQueryDao.deleteViewQuery(viewQuery);
	}
}
